#include <iostream>
#include <list>
#include <deque>
using std::cout;
using std::endl;
using std::list;
using std::deque;

template <typename T>
void display(T t){
    for(auto &con:t){
        cout << con<< " ";
    }
    cout << endl;
}

void test(){
    list<int> list1{1,2,3,4,5,6};
    deque<int> dq1;
    deque<int> dq2;
    for(auto & i : list1){
        if(i%2 == 0){
            dq1.push_back(i);
        }else{
            dq2.push_back(i);
        }
    }
    display(dq1);
    display(dq2);

}

int main()
{
    

    test ();
    return 0;
}

